Seam badge, and a pasteable cosmetics.json entry - #9
Merged
Conversation
The preview now says whether a pattern shows a seam once the game tiles it: Seamless, Slight seam, or Visible seam. The metric is subtler than it looks, which is why this is a port rather than a re-derivation. A correctly-tiling periodic pattern legitimately has a hard transition at the wrap — period-8 stripes on a 32-wide canvas put a stripe boundary exactly there. What makes a seam visible is the wrap being an OUTLIER, so it is ranked against the 90th percentile of the pattern's own interior transitions rather than their mean; the mean is dragged down by the many identical column pairs inside a periodic pattern, which is what made an earlier version flag 17 of 28 correctly-tiling patterns. It also carries the rhythm check, which local adjacency cannot do: period-7 stripes on a 32-wide canvas make a perfectly ordinary-looking edge while the cadence breaks on tiling. Driven in the app, that case reports Visible seam and a checkerboard reports Seamless. Scoring walks the bitmap several times looking for its intrinsic period, so it settles 250ms after a stroke rather than running on every pointermove. The DSL fixture now carries both scores and the label for all 62 programs, and the suite compares them to 1e-9 — pinning the numbers rather than just the verdict, so a port that lands on the right label by luck still fails. All three verdicts appear in the corpus. Export gains the cosmetics.json entry: the file keys patterns by their encoded data, so the entry is that key and a name, slugified. role_group is entitlement metadata the game assigns and a new pattern does not claim it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCrKKTD2mwHx8Fm1EnJiQ3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 5 of the v0.2.0 plan — OpenFront fidelity, continued.
The preview now says whether a pattern shows a seam once the game tiles it: Seamless, Slight seam, or Visible seam.
Why this is a port, not a re-derivation
The metric is subtler than it looks. A correctly-tiling periodic pattern legitimately has a hard transition at the wrap — period-8 stripes on a 32-wide canvas put a stripe boundary exactly there. What makes a seam visible is the wrap being an outlier: more discontinuous than the pattern's own interior ever gets.
So the wrap is ranked against the 90th percentile of interior transitions, not their mean. The mean is dragged down by the many identical column pairs inside a periodic pattern, which is precisely what made an earlier version of this metric flag 17 of 28 correctly-tiling patterns.
It also carries the rhythm check, which local adjacency cannot do: period-7 stripes on a 32-wide canvas make a perfectly ordinary-looking edge while the cadence breaks on tiling. Driven in the running app:
Cost
Scoring walks the bitmap several times looking for its intrinsic period, so it settles 250 ms after a stroke rather than running on every
pointermove.Proof
The DSL fixture now carries both scores and the label for all 62 programs, and the suite compares them to 1e-9 — pinning the numbers rather than only the verdict, so a port that lands on the right label by luck still fails. All three verdicts appear in the corpus.
cosmetics.json entry
Export gains a pasteable entry. The file keys patterns by their encoded data, so the entry is that key plus a slugified name.
role_groupis entitlement metadata the game assigns — a new pattern does not claim it.🤖 Generated with Claude Code
https://claude.ai/code/session_01UCrKKTD2mwHx8Fm1EnJiQ3